<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!--select2-->

    <!--zTree css-->

    <jsp:include page="../page/public.jsp"></jsp:include>
    <link rel="stylesheet" href="/resource/plugins/validator/jquery.validator.css">

</head>

<body class="sidebar-mini skin-blue-light fixed">
<!-- Site wrapper -->
<div class="wrapper">
    <jsp:include page="../page/header.jsp"></jsp:include>
    <jsp:include page="../page/left-sidebar.jsp"></jsp:include>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h2></h2>
            <ol class="breadcrumb">
                <li >客户公司中心</li>
                </li>
                <li class="active">客户管理</li>
            </ol><!-- .breadcrumb -->
        </section>

        <!-- Main content -->
        <section class="content">
            <!-- Default box -->
            <div class="box box-primary">
                <div class="box-header with-border">
                    <form class="form-horizontal" id="news_search">
                        <div class="row">
                            <div class="col-md-2 col-sm-2 col-xs-12">
                                <input type="text" class="form-control" id="search_name" placeholder="名称">
                            </div>

                            <div class="col-md-1 col-sm-1 col-xs-12">
                                <button type="button" class="btn btn-primary" id="btn_search" >
                                    <i class="fa fa-search"></i> 查询</button>
                            </div>

                            <%--<shiro:hasPermission name="AGENCY:ADD">--%>
                            <div class="col-md-1 col-sm-1 col-xs-12">
                                <a class="btn btn-primary"  data-toggle="modal" href="#addArea" onclick="clearAddModal()">
                                    <i class="fa fa-plus"></i> 新增</a>
                            </div>
                            <%--</shiro:hasPermission>--%>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="area_table"></table>
                </div>
            </div>
        </section>
    </div>
    <!-- /.content-wrapper -->
    <jsp:include page="../page/footer.jsp"></jsp:include>
</div>
<!-- ./wrapper -->
<div class="modal fade bs-example-modal-lg" id="addArea" tabindex="-1" role="dialog"
     aria-labelledby="agencyModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" >
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×</button>
                <h4 class="modal-title" id="areaModalLabel"></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal"  role="form" id="area_form" >
                    <input type="hidden" id="id4add" name="id">
                    <div class="form-group">
                        <label class="control-label col-sm-3"><font color="#c00">*</font>客户名称:</label>
                        <div class="col-sm-6">
                            <input type="text" id="name4add" name="name" class="form-control" placeholder="请输入客户名称" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">联系人:</label>
                        <div class="col-sm-6">
                            <input type="text" id="contact4add" name="contact" class="form-control" placeholder="请输入联系人" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">联系方式:</label>
                        <div class="col-sm-6">
                            <input type="text" id="phone4add" name="phone" class="form-control" placeholder="请输入联系方式" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">省市区:</label>
                        <div class="col-sm-6" id="distpicker4add">
                            <div class="col-sm-4">
                                <select class="form-control" id="province4add" name="province"><option value="" data-code="">-- 省 --</option></select>
                            </div>
                            <div class="col-sm-4">
                                <select class="form-control" id="city4add" name="city"><option value="" data-code="">-- 市 --</option></select>
                            </div>
                            <div class="col-sm-4">
                                <select class="form-control" id="district4add" name="district"><option value="" data-code="">-- 区 --</option></select>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">详细地址:</label>
                        <div class="col-sm-6">
                            <input type="text" id="address4add" name="address" class="form-control" placeholder="请输入详细地址" >
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="btn-area-save"
                        data-loading-text="提交中...">保存</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade bs-example-modal-lg" id="addAccount" tabindex="-1" role="dialog"
     aria-labelledby="agencyModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" >
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×</button>
                <h4 class="modal-title" id="accountModalLabel"></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal"  role="form" id="account_form" >
                    <input type="hidden" id="id4account" name="companyId">
                    <div class="form-group">
                        <label class="control-label col-sm-3"><font color="#c00">*</font>用户名:</label>
                        <div class="col-sm-6">
                            <input type="text" id="username4account" name="username" class="form-control" placeholder="请输入用户名" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">密码:</label>
                        <div class="col-sm-6">
                            <input type="text" id="password4account" name="password" class="form-control" placeholder="请输入密码" >
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="btn-account-save"
                        data-loading-text="提交中...">保存</button>
            </div>
        </div>
    </div>
</div>

<script src="/resource/plugins/validator/jquery.validator.js"></script>
<script src="/resource/plugins/distpicker/distpicker.data.js"></script>
<script src="/resource/plugins/distpicker/distpicker.js"></script>
<script >
    $(function () {

        $('#distpicker4add').distpicker({
            autoSelect: false
        });

    });
</script>
<script src="/static/company/company.js"></script>
</body>
</html>